package com.photoprint.db;

import android.provider.BaseColumns;

/**
 * @author wuyiqi
 * @since 2011-3-3
 * 
 * ��ݱ�Ķ��壬�Լ������sql���
 */
public class DBDefine {
	
	//购物车
	public static class SHOPCAR{
		public final static String TABLE_NAME = "SHOP_CAR";
		
		public final static String ID = "ID";
		public final static String THUMB_DATA = "THUMB_DATA";
		public final static String DATA = "DATA";
		public final static String TIMEDATE = "TIME_DATE";
		public final static String SIZE = "SIZE";
		public final static String NUMBER = "NUMBER";
		public final static String ISUPDATE = "IS_UPDATE";
		public final static String IS_PAY = "IS_PAY";
	}
	
	//个人详情
	public static class ADDRESS{
		public final static String TABLE_NAME = "TABLE_NAME";
		
		public final static String ID = "ID";
		public final static String PROVINCE = "PROVINCE";
		public final static String CITY = "CITY";
		public final static String STREET = "STREET";
		public final static String POSTCODE = "POSTCODE";
		public final static String MOBILE_PHONE = "MOBILE_PHONE";
		public final static String EMAIL = "EMAIL";
		public final static String NAME ="NAME";
		
	}
	
	/**
	 * 购物车
	 * create db sql
	 * @return
	 */
	public String creatSHOPCARTableSql(){
		StringBuffer user_list = new StringBuffer();
		user_list.append("CREATE TABLE IF NOT EXISTS ").append(SHOPCAR.TABLE_NAME).append("(")
				 .append(SHOPCAR.ID).append(" INTEGER PRIMARY KEY AUTOINCREMENT,")
				 .append(SHOPCAR.THUMB_DATA).append(" VARCHAR(256)  NULL,")
				 .append(SHOPCAR.DATA).append(" VARCHAR(256)  NULL,")
				 .append(SHOPCAR.TIMEDATE).append(" VARCHAR(256)  NULL,")
				 .append(SHOPCAR.SIZE).append(" VARCHAR(256)  NULL,")
				 .append(SHOPCAR.NUMBER).append(" VARCHAR(256)  NULL,")
				 .append(SHOPCAR.ISUPDATE).append(" VARCHAR(256)  NULL,")
				 .append(SHOPCAR.IS_PAY).append(" VARCHAR(256)  NULL)");
		return user_list.toString();
	}
	
	/**
	 * 个人详情
	 * @return
	 */
	public String creatADDRESSTableSql(){
		StringBuffer user_list = new StringBuffer();
		user_list.append("CREATE TABLE IF NOT EXISTS ").append(ADDRESS.TABLE_NAME).append("(")
				 .append(ADDRESS.ID).append(" INTEGER PRIMARY KEY AUTOINCREMENT,")
				 .append(ADDRESS.PROVINCE).append(" VARCHAR(256)  NULL,")
				 .append(ADDRESS.CITY).append(" VARCHAR(256)  NULL,")
				 .append(ADDRESS.STREET).append(" VARCHAR(256)  NULL,")
				 .append(ADDRESS.POSTCODE).append(" VARCHAR(256)  NULL,")
				 .append(ADDRESS.MOBILE_PHONE).append(" VARCHAR(256)  NULL,")
				 .append(ADDRESS.EMAIL).append(" VARCHAR(256)  NULL,")
				 .append(ADDRESS.NAME).append(" VARCHAR(256)  NULL)");
		return user_list.toString();
	}
}
